package com.hiof.media;

import android.net.Uri;
import com.hiof.Configuration;

import java.io.File;

/**
 * Created with IntelliJ IDEA.
 * User: manish
 * Date: 4/16/12
 * Time: 2:29 PM
 * To change this template use File | Settings | File Templates.
 */
public class CameraIntent extends MediaIntent {
    public CameraIntent() {
        super(android.provider.MediaStore.ACTION_IMAGE_CAPTURE);
        initDefault();
    }

    @Override
    protected void initDefault() {
        mediaFilePath = Configuration.IMAGE_FILE_URL;
        mediaFile = new File(mediaFilePath);
        if (!mediaFile.isDirectory()) {
            mediaFile.mkdirs();
        }
        mediaOutputFile = new File(mediaFilePath, System.currentTimeMillis()
                + ".jpeg");
        mediaFileUri = Uri.fromFile(mediaOutputFile);
        putExtra(android.provider.MediaStore.EXTRA_OUTPUT, mediaFileUri);
    }
}

